<%@ include file="/taglibs.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<head>
	<title>北京邮电大学学生党员在线学习中心</title>
	<link href="${ctx}/css/dtree.css" rel="stylesheet" type="text/css" />
	<link href="${ctx}/css/pagination.css" rel="stylesheet" type="text/css" />
    <script src="${ctx}/scripts/dtree.js" type="text/javascript"></script>
    <script type="text/javascript">
    	function callIFrame(){
    		var categoryId = $(this).attr("href");
    		window.videoFrame.location.replace("${ctx}/DetailsAction_details?categoryId=" + categoryId);
    		return false;
    	}
    </script>
</head>

<div id="nav_bar">
    <img id="nav_bar_left" src="../../../styles/nav_bar_left.png" alt=""/>
    <div id="welcome_label">欢迎您，&nbsp;<s:property value="#session.session_user.studentName" />!</div>
    <img id="nav_bar_seperator" src="../../../styles/nav_bar_seperator.png" alt=""/>
    <div id="nav_location">
        <img id="nav_bar_point" src="../../../styles/nav_bar_point.png" alt="" />
        <div id="nav_cur_location">当前位置：&nbsp;<span style="color:black;">影视精品</span></div>
    </div>
    <img style="float:right; width:5px;" src="../../../styles/nav_bar_right.png" alt=""/>
    <a id="nav_logout" href="${ctx}/logoutAction">[安全退出]</a>
</div>
<div style="clear:both; height:5px;">&nbsp;</div>

<div style="min-height:450px;">
	<!-- left -->
	<div id="side_menu" style="min-height:750px;">
	    <div id="side_menu_title">
	        <img src="../../../styles/side_menu_title_img.png" alt="" />
	        <span>影视精品</span>
	    </div>
	    <div id="tree" style="width:180px; float:left; margin-left:20px; margin-top:5px; text-align:left;"></div>
		<div class="dtree">
			<script type="text/javascript">
				var menuStr = '<%=request.getAttribute("menuStr")%>';
				menuStr = menuStr.substr(1);
				
				var menuIndex = 10;
				var menuIndex2 = 1;
				d = new dTree('d');
				d.add(0,-1,'视频菜单','','', '','${ctx}/css/img/folder.gif');
				
				var preArray = menuStr.split("#");
				var index = 0;
				for(;index < preArray.length; index = index + 1){
					var subArray = preArray[index].split("&");
					var parentItem = subArray[0];
					var parentDetails = parentItem.split(",");
					d.add(menuIndex, 0, parentDetails[1], '/' + parentDetails[0], '', 'right');
					
					var childItems = subArray[1].substr(0, subArray[1].length - 1).split(";");
					menuIndex2 = 1;
					for(var subIndex = 0; subIndex < childItems.length; subIndex = subIndex + 1){
						var childItem = childItems[subIndex];
						var childDetails = childItem.split(",");
						d.add((menuIndex * 100 + menuIndex2), menuIndex, childDetails[1], '/' + parentDetails[0] + "/" + childDetails[0],'', 'right','');
						menuIndex2 = menuIndex2 + 1;
					}
					menuIndex = menuIndex + 1;
				}
			
			    document.getElementById("tree").innerHTML=d;
				// 获取所有的sd*
				$("a[id][id^='sd']").each(function(){
					$(this).click(callIFrame);
				});
			</script>
		</div>
	</div>
	
	<div id="main_content">
	    <div id="main_content_title">
	        <img src="../../../styles/content_title_img.png" alt="" />
	        <span>视频列表</span>
	    </div>
	    <div class="main_content_title_bottom">&nbsp;</div>
	    <iframe id="videoFrame" name="videoFrame" width="725px" height="700px" style="margin-left:10px;" onload="this.height=iFrame1.document.body.scrollHeight" frameborder="0" src="${ctx}/DetailsAction_details?categoryId=/">
		</iframe> 
	</div>
	<div style="clear:both;">&nbsp;</div>
</div>